﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using X3DXNA.interfaces;

namespace X3DXNA.core.CustomNodes
{
    public class MyMaterial : IUsable, IAppearance
    {
        Vector3 _diffuseColor;

        public String DEF { get; set; }
        public Vector3 diffuseColor { get { return _diffuseColor; } 
            set { if (value != null) _diffuseColor = value; } }
        public Vector3 emissiveColor { get; set; }
        public Vector3 specularColor { get; set; }
        public float shininess { get; set; }
        public float ambientIntensity { get; set; }

        public float transparency
        {
            get { return _transparency; }
            set { _transparency = System.Math.Abs(value - 1); }
        }

        private float _transparency;

        public MyMaterial()
        {
            DEF = "Standard";
            diffuseColor = new Vector3(0.8f, 0.8f, 0.8f);
            emissiveColor = Vector3.Zero;
            specularColor = Vector3.Zero;
            shininess = 0.2f;
            ambientIntensity = 0.2f;
            transparency = 0;
        }
    }


}
